package com.ddtech.business.practice.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ddtech.business.practice.dto.QueAndOptDto;
import com.ddtech.business.practice.dto.UserRecordDto;
import com.ddtech.business.practice.dto.WorkbookDto;
import com.ddtech.business.practice.entity.PracticeUserQuestion;
import com.ddtech.business.practice.entity.PracticeUserRecord;

import java.util.List;

public interface PracticeService {
    /**
     * 查询练习记录
     *
     * @param pageableRequest
     * @param startTime
     * @param endTime
     * @return
     */
    Object getUserRecord(IPage pageableRequest, String startTime, String endTime);

    /**
     * 练习
     *
     * @param workbookDto
     * @return
     */
    Object workbook(WorkbookDto workbookDto);

    /**
     * 提交
     *
     * @param checkRecord
     * @return
     */
    PracticeUserRecord commit(UserRecordDto checkRecord);

    /**
     * 获取题目和选项
     * @param userId
     * @param records
     * @return
     */
    List<QueAndOptDto> getTypeQuestion(String userId, List<PracticeUserQuestion> records);

    /**
     * 查询练习统计
     *
     * @return
     */
    Object getStatistics();
}
